FROM debian:13.2-slim
ADD  influxd2712influx275.tar.gz /usr/local/
ENV TZ=Asia/Shanghai
# 自定义配置文件的目录路径
# ENV NFLUXD_CONFIG_PATH=/usr/local/influxd2712influx275
ENV INFLUXDB_HOME=/usr/local/influxd2712influx275
ENV PATH=$PATH:$INFLUXDB_HOME
EXPOSE 8086
CMD ["influxd2712"]

# tar -czvf influxd2712influx275.tar.gz influxd2712influx275/
# docker build -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/influxdb:d132-2712 .
# docker run --rm --name influxdb -p 8086:8086 registry.cn-hangzhou.aliyuncs.com/xiaoyilin/influxdb:d132-2712
# docker run --name influxdb -d -p 8086:8086 registry.cn-hangzhou.aliyuncs.com/xiaoyilin/influxdb:d132-2712
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/influxdb:d132-2712


# https://portal.influxdata.com/downloads/
# 所有写入InfluxDB的数据都是使用line protocol编写
# 一种基于文本的格式，允许提供必要的信息来将数据点写入InfluxDB
# https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/
# InfluxDB配置文件和配置选项
# https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options
# influxd启动会检查当前工作目录中名为config.yml/config.toml/config.json的文件
# 配置文件中只需要定义非默认设置
# 命令行初始化
# influx275 setup --host http://localhost:8086 --org xylOrg --bucket xylBucket --username xylUser --password Xyl@xiao10 --token hC5vTBviX0XFOPqjBaCxtRcA1UzNuynTWCcqlMTV-V_aVuFQCtb9eFi9rvi8FYGY9eMS6c1U7bWTAyeffAMdUA== --force
# 服务器配置
# influx275 server-config --yaml
# influx275 server-config --json
# https://docs.influxdata.com/influxdb/v2/api/